package com.xwh.shop.goods.model.vo;

import com.xwh.shop.goods.model.entity.Category;
import lombok.Data;

@Data
public class CategoryListVO {
    private Long id;
    private String name;

//    提供构造方法
    public CategoryListVO(){

    }
//    直接传入一个category 简化别的地方的书写
    public CategoryListVO(Category category){
        this.id = category.getId();
        this.name = category.getName();
    }
}
